﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using Core.BusinessLogic.Interfaces;
using Core.Common;
using Core.DataAccess.IRepositories;
using Core.DataAccess;

namespace Core.BusinessLogic
{
    [Export(typeof(ILevelService))]
    public class LevelService : ILevelService
    {
        [Import]
        private ILevelRepository _levelRepository;

        public LevelService()
        {
            MEFManager.Compose(this);
        }

        public string GetLevelPathByLevelID(int levelID)
        {
            return _levelRepository.GetLevelPathByLevelID(levelID);
        }

        public int GetScoreUpByLevelID(int levelID)
        {
            return _levelRepository.GetNextScoreUpByLevelID(levelID);
        }

        public int NumberLevel()
        {
            return _levelRepository.NumberLevel();
        }

        public List<Level> GetAllLevels()
        {
            return _levelRepository.GetAllLevels();
        }

        public string GetLevelNameByLevelID(int levelID)
        {
            return _levelRepository.GetLevelNameByLevelID(levelID);
        }
    }
}
